package com.own.core.html.modal;

import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;

import com.own.core.html.panel.OwnPanel;

public class OwnModalWindow extends ModalWindow {

	String title;
	OwnPanel panal;

	public OwnModalWindow() {
		this("modalwindow");
	}

	public OwnModalWindow(String id) {
		super(id);

		initWindow();
	}

	public OwnModalWindow(String id, String title) {
		super(id);
		this.title = title;
		initWindow();
	}

	void initWindow() {

		// Set sizes of this ModalWindow. You can also do this from the HomePage
		// but its not a bad idea to set some good default values.
		setInitialWidth(650);
		setInitialHeight(550);
		if (title != null) {
			setTitle(title);
		}
		// Set the content panel, implementing the abstract methods
	}

	public ModalWindow setContent(final OwnPanel panal) {
		this.panal = panal;
		return super.setContent(panal);
	}

}
